export function getCouponList(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/list',
    data
  })
}

// 查看优惠券详情
export function getCouponInfo(id) {
  return window.fetch({
    method: 'POST',
    url: '/discount/info',
    data: id
  })
}

// 优惠券统计  优惠券
export function getCouponsTj(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/statis',
    data
  })
}

//  优惠券
export function addCoupon(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/redact',
    data
  })
}
//  活动
export function getActivityList(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/buy/list',
    data
  })
}

//  批次列表 
export function getProvidesList(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/provides/list',
    data
  })
}

//  批次状态
export function setProvideState(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/provides/state',
    data
  })
}

//  批次编辑 
export function setProvide(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/provides/redact',
    data
  })
}
//  活动详情 
export function activityInfo(id) {
  return window.fetch({
    method: 'POST',
    url: '/discount/buy/info',
    data: id
  })
}

// 活动编辑  
export function editActivity(data) {
  return window.fetch({
    method: 'POST',
    url: '/discount/buy/redact',
    data
  })
}


//  优惠券下拉 

export function getCouponPull() {
  return window.fetch({
    method: 'POST',
    url: '/discount/pull/coupon'
  })
}

//酒店下拉
export function getHotelPull() {
  return window.fetch({
    method: 'POST',
    url: '/discount/pull/hotel'
  })
}
